<template>
    <div class="common-toolbar" :style="{'text-align':align == 'center' ? 'center':'left' }">
       <!-- <span class="titleLine" v-show="text&&hasIcon"></span>-->
        <!-- <img src="../../../imgs/listIcon.png" /> -->
        <i class="el-icon-document-copy" style="font-weight: 700;font-size: 22px;color:#52B7F5;"></i>
        <span class="titleText" v-show="text">{{text}}</span>
        <div class="inner-toolbar" :style="{'float':align == 'right' ? 'right':'','display':align == 'left' ? 'inline-block':''}">
            <slot></slot>
        </div>
    </div>
</template>
<script>
    export default {

        data() {
            return {};
        },

        methods: {
            setCurrentValue(val) {
                this.title = val;
            }
        },

        props: {
            text: {
                type: [String]
            },
            align: {
                type: [String], // left middle right
                default: 'right'
            },
            hasIcon: {
                type: [Boolean],
                default: true
            }
        },
    }
</script>
